﻿@model ClinicaMVC3.Models.RegisterModel


<fieldset>
    <legend>Conta de usuário</legend>

    <div class="editor-label">
        @Html.LabelFor(m => m.UserName)
    </div>
    <div class="editor-field">
        @if ((ViewBag.Method == "Detail") || (ViewBag.Method == "Edit"))
        {
        @Html.DisplayTextFor(m => m.UserName)
        @Html.HiddenFor(m => m.UserName)
        }
        else
        {
        @Html.TextBoxFor(m => m.UserName)
        @Html.ValidationMessageFor(m => m.UserName)            
        }

    </div>

    <div class="editor-label">
        @Html.LabelFor(m => m.Email)
    </div>
    <div class="editor-field">
        @if ((ViewBag.Method == "Detail") || (ViewBag.Method == "Edit"))
        {
        @Html.DisplayTextFor(m => m.Email)
        }
        else
        {
        @Html.TextBoxFor(m => m.Email)
        @Html.ValidationMessageFor(m => m.Email)            
        }
    </div>

    <div class="editor-label">
        @Html.LabelFor(m => m.Password)
    </div>
    <div class="editor-field">
        @if ((ViewBag.Method == "Detail") || (ViewBag.Method == "Edit"))
        {
        @Html.PasswordFor(m => m.Password, new { @disabled = true })
        }
        else
        {
        @Html.PasswordFor(m => m.Password)
        @Html.ValidationMessageFor(m => m.Password)
        }

            
            
    </div>

    <div class="editor-label">
        @Html.LabelFor(m => m.ConfirmPassword)
    </div>
    <div class="editor-field">

        @if ((ViewBag.Method == "Detail") || (ViewBag.Method == "Edit"))
        {
        @Html.PasswordFor(m => m.ConfirmPassword, new { @disabled = true })
        }
        else
        {
        @Html.PasswordFor(m => m.ConfirmPassword)
        @Html.ValidationMessageFor(m => m.ConfirmPassword)
        }
    </div>

</fieldset>